-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tracing): do not stall on dialogs #7059
Conversation
await page.goto(server.EMPTY_PAGE); | ||
|
||
page.on('dialog', async dialog => { | ||
await dialog.accept(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have to catch this promise and await it? I am worried that dialog.accept
will race with context.close
and throw an unhandled promise rejection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we are ok since the following call to confirm is blocking and is serialized with the accept ack.
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
Cherry-Pick microsoft#7059 SHA cbce7cb Fixes microsoft#7048
Fixes #7048